<template>

  <iframe :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>

</template>

<script>

  export default {
    name: 'IframePageRouter',

    data () {
      return {
        url: '',
        id: ''
      }
    },
    created () {
      this.goUrl()
    },
    updated () {
      this.goUrl()
    },
    watch: {
      $route (to, from) {
        this.goUrl()
      }
    },
    methods: {
      goUrl () {
      const url = this.$route.query.url
      this.url = url
      this.$route.meta.title = this.$route.query.title
      }
    }
  }
</script>

<style>
</style>
